home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam08
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
1KB
|
91 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object obj;
InitDynace(&argc);
/* Create and print an instance of short integer */
obj = gNewWithInt(ShortInteger, 8);
gPrint(obj, stdoutStream);
/* Cause an error by trying to execute a generic which is not
associated with the ShortInteger class (comment out the
next line after running the program to allow the following
errors to be demonstrated). */
gFirst(obj);
/* Create another error condition where there is a missing second
argument (uncomment out the next line to demo the error -
re-comment to see the following error) */
/* gPrint(obj); */
/* Cause an error by attempting to use an object after it has
been disposed. */
gDispose(obj);
gPrint(obj, stdoutStream);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/